<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>{$site_info.site_name|default=''}</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
        crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="//cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
        crossorigin="anonymous"></script>
    <style type="text/css">
.m-d-warp {
    position: fixed;
    left: 10%;
    top: 30%;
    width: 80%;
    max-width: 300px;
    background: #fff;
    z-index: 1000;
    overflow: hidden;
    border-radius: 5px;
}
.md-w-head {
    padding: 1em 1.6em .5em;
    text-align: center;
    font-size: 24px;
}


.md-w-body {
    padding: 0 1.6em .8em;
    min-height: 40px;
    font-size: 15px;
    line-height: 1.3;
    word-wrap: break-word;
    word-break: break-all;
    color: #999;
    max-height: 200px;
    overflow-y: auto;
    text-align: center;
}
.md-w-foot {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    position: relative;
    line-height: 48px;
    font-size: 18px;
    text-align: center;
    border-top: 1px solid #d5d5d6;
}

.md-w-foot .enter {
    color: #00B4EC;
}

.md-wf-item {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    position: relative;
    line-height: 48px;
    font-size: 18px;
}
.md-wf-item:after {
    content: " ";
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    bottom: 0;
    border-left: 1px solid #d5d5d6;
    color: #d5d5d6;
}
.m-d-mask {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: .5;
    z-index: 999;
}

    </style>
</head>

<body>
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="javascript:void(0);">
                    {$site_info.site_name|default=''}
                </a>
            </div>
        </div>
    </nav>
    <div class="container">
        <h2>提交请求</h2>
        <form id="form" onsubmit="return false">
            <div class="form-group">
                <label for="exampleInputEmail1">电邮地址</label>
                <input type="email" name="email" class="form-control" required>
            </div>
            <div class="form-group">
                <label for="exampleInputPassword1">手机号码</label>
                <input type="number" name="mobile" class="form-control" required>
            </div>
            <div class="form-group">
                <label for="exampleInputPassword1">标题</label>
                <input type="text" name="title" class="form-control" required>
            </div>

            <div class="form-group">
                <label for="exampleInputPassword1">描述</label>
                <input type="text" name="content" class="form-control" required>
            </div>

            <button id="submit" type="button" class="btn btn-default">提交</button>
        </form>
    </div>
<div class="m-d-mask" style="display: none;"></div>
<div class="m-d-warp" style="display: none;">
    <div class="md-w-head">提示</div>
    <div class="md-w-body">提交成功，感谢您的反馈。</div>
    <div class="md-w-foot">
        <div class="md-wf-item enter" id="MobileUi_enter" onclick="hide_alert()">确定</div>
    </div>
</div>

</body>
<script>
    $(function () {
        $('#submit').click(function () {
            $.ajax({
                type: "POST",
                url: "{:url('/api/wallet/main/help')}",
                data: $('#form').serialize(),
                success: function (data) {
                    //alert(data.msg);
                    if (data.code == 1){
                        $('.md-w-body').html('提交成功，感谢您的反馈。');
                        $('.m-d-mask,.m-d-warp').show();
                    }else{
                        $('.md-w-body').html(data.msg);
                        $('.m-d-mask,.m-d-warp').show();
                    }
                }
            });
            return false
        });

    })

    function hide_alert(){
        $('.m-d-mask,.m-d-warp').hide();
    }
</script>

</html>